/**
 * @file Alarm_Clock.h
 ******************************************************************************
 * Copyright (c) 2024 - ~, SCUT-RobotLab Development Team
 * @file    Alarm_Clock.h
 * @author  Jasper
 * @brief   Header file
 ******************************************************************************
 * @attention
 *
 * if you had modified this file, please make sure your code does not have many
 * bugs, update the version Number, write dowm your name and the date, the most
 * important is make sure the users will have clear and definite understanding
 * through your new brief.
 *
 * <h2><center>&copy; Copyright (c) 2024 - ~, SCUT-RobotLab Development Team.
 * All rights reserved.</center></h2>
 *************
 *****************************************************************
 */

#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
    /* Includes ------------------------------------------------------------------*/
#include "HeadFiles\SysFunVarDefine.h"
#include "Beep\Beep.h"
/* Private macros ------------------------------------------------------------*/

/* Private type --------------------------------------------------------------*/
#define NUM_OF_ALARM 8
    typedef enum
    {
        Off = 0,
        On
    } Typedef_Alarm_Setting;
    typedef enum
    {
        nring = 0,
        ring
    } Typedef_Alarm_Status;
    typedef struct
    {
        CLOCK Time;
        Typedef_Alarm_Setting Setting;
        Typedef_Alarm_Status Status;
        uint8_t ID;
        Typedef_Song Music;
    } Struct_Alarm_Clock;
    extern Struct_Alarm_Clock Alarm_Clock[NUM_OF_ALARM];
    /* Exported macros -----------------------------------------------------------*/

    /* Exported types ------------------------------------------------------------*/

    /* Exported function declarations --------------------------------------------*/
    void Alarm_Check(Struct_Alarm_Clock *Tmp_Alarm, const CLOCK *Tmp_Current);
    void Alarm_Modi_Setting(Struct_Alarm_Clock *Tmp_Alarm, Typedef_Alarm_Setting Tmp_Set);
    void Alarm_Modi_Month(Struct_Alarm_Clock *Tmp_Alarm, unsigned char Month);
    void Alarm_Modi_day(Struct_Alarm_Clock *Tmp_Alarm, unsigned char day);
    void Alarm_Modi_Hour(Struct_Alarm_Clock *Tmp_Alarm, unsigned char Hour);
    void Alarm_Modi_Min(Struct_Alarm_Clock *Tmp_Alarm, unsigned char Min);
    void Alarm_Reset(Struct_Alarm_Clock *Tmp_Alarm);
    void Alarm_Modi_Song(Struct_Alarm_Clock *Tmp_Alarm, Typedef_Song Tmp_Song);
    Typedef_Alarm_Status Alarm_Get_Status(Struct_Alarm_Clock *Tmp_Alarm);
    void Alarm_Copy(Struct_Alarm_Clock *Tmp_Alarm,Struct_Alarm_Clock *Tmp_Copy_Alarm);
#ifdef __cplusplus
}
#endif

/************************ COPYRIGHT(C) SCUT-ROBOTLAB **************************/
